#include "printf.h"
#include "hal_basic.h"


int main(){
    printf("start...\n");

    setLedValue(1);

    gTimeoutFlag = 0;
    setTimerTopValue(16000000);
    enableTimerInt();
    enableGlobalInt();
    startTimer();

    while(1){
        if (gTimeoutFlag) {
            setLedValue(getLedValue()+1);
            printf("timeout...\n");
            gTimeoutFlag = 0;
        }
    }
}


